#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;

ll qmi(ll a, ll b, ll p)
{
    ll res = 1 % p;
    while (b)
    {
        if (b & 1) res = res * a % p;
        a = a * (ll)a % p;
        b >>= 1;
    }
    return res;
}

ll n;
void work()
{
	cin>>n;
	cout<<qmi(2,n,1e9+7)-1<<'\n';
	
}

int main()
{
	ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);
	int _; 
	cin>>_;
	while (_--) work();
	return 0;
}